<?php

class Form_Login extends App_Form
{
    public function __construct($options = null)
    {
        parent::__construct($options);

        // change the class on the outer <dl> tag
        $this->getDecorator('HtmlTag')->setOption('class', 'form');

        $this->setName('login');

        $username = $this->textElement('username', 'User name (Email):');

        $password = $this->password('password','Password');
       
        $redirect = $this->hiddenElement('_redirect_url');

        $submit = $this->submit('submitbutton', 'Login');
        
        $this->addElements(array($username, $password, $redirect, $submit));
    }

    public function setRedirectUrl($url){
		$this->getElement('_redirect_url')->setValue($url);
	}

	public function getRedirectUrl(){
		return $this->getElement('_redirect_url')->getValue();
	}

}
